package com.stenio.fancat.service.enums;

/**
 * @author liuan
 * @create 2019-02-19 18:10
 */
public enum RedPacketSendType {

    OFF(1,"无限制"),
    DAYONCE(2,"限制(天)"),
    ONLYONCE(3,"限制(人)");

    private int status;
    private String desc;

    RedPacketSendType(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }

    public static RedPacketSendType getEnumByStatus(Integer i){
        for(RedPacketSendType status:RedPacketSendType.values()){
            if(status.getStatus()==i){
                return status;
            }
        }
        return null;
    }

}
